<template>
	<view class="user">

		<view class="software">
			<view class="header">
				软件相关
			</view>
			<view class="version">
				<view class="">
					<uni-icons type="help" size="20"></uni-icons>
					<text class="title">版本号</text>
				</view>

				<text class="title">v1.0</text>
			</view>

			<view class="logo-out" @click="loginOut">
				退出登录
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { loginApi } from '@/apis/apis'
	import { userStore } from '@/store/user'
	const loginOut = async () => {

		await loginApi.dropOutUsingGET({ sysUserId: userStore.SysUser?.id })

		uni.reLaunch({
			url: '/pages/loginPage/loginPage',
			success(result) {
				console.log('reLaunch success', result.errMsg)
				uni.removeStorageSync('token')
			}

		})
	}
</script>

<style lang="scss" scoped>
	.user {
		padding: 20px;
	}

	.software {
		padding: 20px;
		background-color: #F7F7F7;
		border-radius: 12px;


		.header {
			width: 150px;
			margin: 0 auto;
			text-align: center;
		}

		.title {
			font-size: 20px;
		}

		.version {
			padding: 10px 5px;
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #dcdcdc;

			.title {
				margin-left: 5px;
			}
		}




		.logo-out {
			text-align: center;
			width: 150px;
			padding-top: 10px;
			color: blue;
			margin: 0 auto;
		}
	}
</style>